$OpenBSD: patch-CMakeLists_txt,v 1.4 2014/07/10 13:20:46 giovanni Exp $
--- CMakeLists.txt.orig	Wed Jan  2 22:46:59 2013
+++ CMakeLists.txt	Thu Jul 10 11:32:46 2014
@@ -68,7 +68,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
 	endif()
 	if(CMAKE_BUILD_TYPE STREQUAL "Release")
 		set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG")
-		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
 	endif()
 	if(WITH_SSE2_TARGET)
 		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
@@ -134,6 +133,10 @@ set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}/${CMA
 # Include directories
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 include_directories(${CMAKE_SOURCE_DIR}/include)
+
+# Done after dirs in freerdp tree to avoid failure when freerdp is installed
+include_directories(/usr/local/include)
+link_directories(/usr/local/lib)
 
 # Configure files
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
